package lumis.service.wsrp.consumer;

import java.util.Properties;

import com.sun.portal.wsrp.common.stubs.v2.PortletDescription;

import lumis.portal.PortalException;

/**
 * Interface for remote portlet manager.
 *
 * @version $Revision: 13092 $ $Date: 2011-05-28 18:19:06 -0300 (Sat, 28 May 2011) $
 * @since 6.0.0
 */
public interface RemotePortletManagementManager
{
	/**
	 * Returns the portlet display name.
	 * @param portletHandle		the portlet handle.
	 * @return					the portlet display name.
	 * @throws PortalException
	 * @since 6.0.0
	 */
	public String getPortletName(String portletHandle)
					throws PortalException;
	
	/**
	 * Returns the description from portlet.
	 * @param portletHandle		the portlet handle.
	 * @return					the description from portlet.
	 * @throws PortalException
	 * @since 6.0.0
	 */
	public String getDescriptionFromPortlet(String portletHandle)
					throws PortalException;
	
	/**
	 * Returns the PortletDescription for the given portletHandle.
	 * @param portletHandle		the portlet handle.
	 * @return					the PortletDescription.
	 * @throws PortalException
	 * @since 6.0.0
	 */
	public PortletDescription getPortletDescription(String portletHandle)
								throws PortalException;
	
	/**
	 * Clones a portlet.
	 * @param producerEntityId	the producer entity id.
	 * @param portletHandle		the portlet handle.
	 * @return the portletHandle of the cloned portlet.
	 * @since 6.0.0
	 */
	public String clonePortlet(String portletHandle)
					throws PortalException;
	
	/**
	 * Returns the portlet properties.
	 * @param producerEntityId	the producer entity id.
	 * @param portletHandle		the portlet handle.
	 * @return					the properties of the portlet.
	 * @since 6.0.0
	 */
	public Properties getPortletProperties(
						String portletHandle)
					throws PortalException;
	
	/**
	 * Returns the portlet property description.
	 * @param producerEntityId	the producer entity id.
	 * @param portletHandle		the portlet handle.
	 * @param propertyName		the property name.
	 * @return					the portlet property description.
	 * @since 6.0.0
	 */
	public String getPortletPropertyDescription(
						String portletHandle,
						String propertyName)
					throws PortalException;
	
	/**
	 * Removes the clone.
	 * @param producerEntityId	the producer entity id.
	 * @param portletHandle		the portlet handle.
	 * @since 6.0.0
	 */
	public void removeClone(
					String portletHandle)
				throws PortalException;
	
	/**
	 * Sets the portlet properties.
	 * @param producerEntityId	the producer entity id.
	 * @param portletHandle		the portlet handle.
	 * @param properties		the new properties.
	 * @since 6.0.0
	 */
	public void setPortletProperties(
					String portletHandle,
					Properties properties)
				throws PortalException;
}
